<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>embedme: XmlData类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="class_xml_data-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">XmlData类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>XML数据类  
 <a href="class_xml_data.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_xml_data_8h_source.html">XmlData.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a53c5142aa69579a5c73a772b9758d928"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_xml_data.html#a53c5142aa69579a5c73a772b9758d928">XmlData</a> ()</td></tr>
<tr class="memdesc:a53c5142aa69579a5c73a772b9758d928"><td class="mdescLeft">&#160;</td><td class="mdescRight">XmlData构造函数  <a href="#a53c5142aa69579a5c73a772b9758d928">更多...</a><br /></td></tr>
<tr class="separator:a53c5142aa69579a5c73a772b9758d928"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a847aa0938ae7466fbcface61c883ecd8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_xml_data.html#a847aa0938ae7466fbcface61c883ecd8">~XmlData</a> ()</td></tr>
<tr class="memdesc:a847aa0938ae7466fbcface61c883ecd8"><td class="mdescLeft">&#160;</td><td class="mdescRight">XmlData析构函数  <a href="#a847aa0938ae7466fbcface61c883ecd8">更多...</a><br /></td></tr>
<tr class="separator:a847aa0938ae7466fbcface61c883ecd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6917a040669cf9c048eedcf27ee20f7c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_xml_data.html#a6917a040669cf9c048eedcf27ee20f7c">initWithDataString</a> (const std::string &amp;content)</td></tr>
<tr class="memdesc:a6917a040669cf9c048eedcf27ee20f7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取XML字符串进行初始化  <a href="#a6917a040669cf9c048eedcf27ee20f7c">更多...</a><br /></td></tr>
<tr class="separator:a6917a040669cf9c048eedcf27ee20f7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a257fec6d724f2eca7b6357d528144b35"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_xml_data.html#a257fec6d724f2eca7b6357d528144b35">initWithContentOfFile</a> (const std::string &amp;fileName)</td></tr>
<tr class="memdesc:a257fec6d724f2eca7b6357d528144b35"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取XML文件内容进行初始化  <a href="#a257fec6d724f2eca7b6357d528144b35">更多...</a><br /></td></tr>
<tr class="separator:a257fec6d724f2eca7b6357d528144b35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a463079e4851be2d59a30ab83b8f85710"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_xml_data.html#a463079e4851be2d59a30ab83b8f85710">saveAsFile</a> (const std::string &amp;fileName)</td></tr>
<tr class="memdesc:a463079e4851be2d59a30ab83b8f85710"><td class="mdescLeft">&#160;</td><td class="mdescRight">写入JSON数据到文件中  <a href="#a463079e4851be2d59a30ab83b8f85710">更多...</a><br /></td></tr>
<tr class="separator:a463079e4851be2d59a30ab83b8f85710"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaccbe1677c6cfc0b0cfa57d7227db266"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_xml_data.html#aaccbe1677c6cfc0b0cfa57d7227db266">serialize</a> ()</td></tr>
<tr class="memdesc:aaccbe1677c6cfc0b0cfa57d7227db266"><td class="mdescLeft">&#160;</td><td class="mdescRight">串行化XmlData成字符串  <a href="#aaccbe1677c6cfc0b0cfa57d7227db266">更多...</a><br /></td></tr>
<tr class="separator:aaccbe1677c6cfc0b0cfa57d7227db266"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b150f9e0b899ecd186767a8a82c4b2b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_xml_data.html#a1b150f9e0b899ecd186767a8a82c4b2b">addSubNode</a> (const std::string &amp;nodeName, const int &amp;value)</td></tr>
<tr class="memdesc:a1b150f9e0b899ecd186767a8a82c4b2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">增加整数型子结点  <a href="#a1b150f9e0b899ecd186767a8a82c4b2b">更多...</a><br /></td></tr>
<tr class="separator:a1b150f9e0b899ecd186767a8a82c4b2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a797602366bea8aa360d66c194965c543"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_xml_data.html#a797602366bea8aa360d66c194965c543">addSubNode</a> (const std::string &amp;nodeName, const double &amp;value)</td></tr>
<tr class="memdesc:a797602366bea8aa360d66c194965c543"><td class="mdescLeft">&#160;</td><td class="mdescRight">增加浮点型子结点  <a href="#a797602366bea8aa360d66c194965c543">更多...</a><br /></td></tr>
<tr class="separator:a797602366bea8aa360d66c194965c543"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f3dd5e677198c44e55665b1aca2200b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_xml_data.html#a6f3dd5e677198c44e55665b1aca2200b">addSubNode</a> (const std::string &amp;nodeName, const std::string value=&quot;&quot;)</td></tr>
<tr class="memdesc:a6f3dd5e677198c44e55665b1aca2200b"><td class="mdescLeft">&#160;</td><td class="mdescRight">增加字符串型子结点  <a href="#a6f3dd5e677198c44e55665b1aca2200b">更多...</a><br /></td></tr>
<tr class="separator:a6f3dd5e677198c44e55665b1aca2200b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a116459823c48877fc8263723d320e7f1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_xml_node.html">XmlNode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_xml_data.html#a116459823c48877fc8263723d320e7f1">operator[]</a> (std::string name)</td></tr>
<tr class="memdesc:a116459823c48877fc8263723d320e7f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">根据名称获取子结点  <a href="#a116459823c48877fc8263723d320e7f1">更多...</a><br /></td></tr>
<tr class="separator:a116459823c48877fc8263723d320e7f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>XML数据类 </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a class="anchor" id="a53c5142aa69579a5c73a772b9758d928"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">XmlData::XmlData </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>XmlData构造函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>none </dd></dl>
<dl class="section note"><dt>注解</dt><dd>XmlData代表一份Xml数据文档 </dd></dl>

</div>
</div>
<a class="anchor" id="a847aa0938ae7466fbcface61c883ecd8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">XmlData::~XmlData </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>XmlData析构函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>none </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="a1b150f9e0b899ecd186767a8a82c4b2b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool XmlData::addSubNode </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>nodeName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>增加整数型子结点 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>结点名称 </td></tr>
    <tr><td class="paramname">value</td><td>整数值 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a797602366bea8aa360d66c194965c543"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool XmlData::addSubNode </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>nodeName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>增加浮点型子结点 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>结点名称 </td></tr>
    <tr><td class="paramname">value</td><td>浮点数值 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a6f3dd5e677198c44e55665b1aca2200b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool XmlData::addSubNode </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>nodeName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string&#160;</td>
          <td class="paramname"><em>value</em> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>增加字符串型子结点 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>结点名称 </td></tr>
    <tr><td class="paramname">value</td><td>字符串值 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a257fec6d724f2eca7b6357d528144b35"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool XmlData::initWithContentOfFile </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>fileName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>读取XML文件内容进行初始化 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a6917a040669cf9c048eedcf27ee20f7c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool XmlData::initWithDataString </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>content</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>读取XML字符串进行初始化 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a116459823c48877fc8263723d320e7f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_xml_node.html">XmlNode</a> XmlData::operator[] </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>根据名称获取子结点 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>结点名称 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>如果存在则返回第一个子结点;否则返回空结点 </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a463079e4851be2d59a30ab83b8f85710"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool XmlData::saveAsFile </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>fileName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>写入JSON数据到文件中 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="aaccbe1677c6cfc0b0cfa57d7227db266"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string XmlData::serialize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>串行化XmlData成字符串 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回xml字符串,失败返回空字符串 </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>libemb/inc/<a class="el" href="_xml_data_8h_source.html">XmlData.h</a></li>
<li>libemb/src/XmlData.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2016年 七月 7日 星期四 19:49:39 , 为 embedme使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
